package com.aotao.springboot.service;


import com.aotao.springboot.domain.*;
import org.apache.ibatis.annotations.Param;

import javax.management.relation.Role;
import java.util.List;

public interface ArticleService {
    //获取文章信息
    public List<Article> getArticle();

    public int insertArticle(Article article);

    public void insertArticleTag(Article article, ArticleTag tag);

    public ArticleTag queryTagByName(@Param("tagName") String tagName);

    public List<ArticleType> queryAllTypes();

    public Article queryArticleByID(int id);

    public int updateArticle(@Param("article") Article article);

    public int updateArticleTag(@Param("article") Article article, @Param("articleTag") ArticleTag tag);

    public int deleteArticleToTagByArticleID(int id);

    public List<ArticleTag> queryAllTags();

    public int insertTypes(ArticleType articleType);

    public int updateType(ArticleType articleType);

    public int deleteTypeByID(@Param("did") int did);

    public int updateArticleForType(@Param("did") int did);
}

